package com.hhkj.study.admin.article.service.base.impl;

import com.github.pagehelper.PageInfo;
import com.hhkj.study.admin.article.entity.ArticleCatalog;
import com.hhkj.study.admin.article.mapper.ArticleCatalogMapper;
import com.hhkj.study.admin.article.model.podo.ArticleCatalogDo;
import com.hhkj.study.admin.article.model.podo.ArticleCatalogPo;
import com.hhkj.study.admin.article.service.base.ArticleCatalogService;
import com.ruoyi.common.base.biz.service.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@Service
public class ArticleCatalogServiceImpl extends BaseServiceImpl<ArticleCatalog, ArticleCatalogDo, ArticleCatalogPo, ArticleCatalogMapper> implements ArticleCatalogService {

    @Override
    public PageInfo<ArticleCatalogPo> pagingPoByDo(ArticleCatalogDo conditionDo) {
        conditionDo.getPageDomain().setOrderByColumn("orderNum");
        conditionDo.getPageDomain().setIsAsc("asc");
        return super.pagingPoByDo(conditionDo);
    }

    @Override
    public Map<String, String> getOrderColumnMap() {
        return new HashMap<String, String>() {{
            put("orderNum", "xac.order_num");
            put("id", "xac.id");
        }};
    }
}